package org.leetcode;

import java.util.LinkedList;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        LinkedList<Integer> list = new LinkedList<>();
//        list.add(1,1);
        list.addFirst(2);
        list.addFirst(3);
        list.addLast(4);

        list.add(3,5);


        System.out.println(list.get(0));
        System.out.println(list.get(2));

        System.out.println(list);
        list.add(1,6);
        System.out.println(list);
    }
}
